<template>
    <div class="VonBDUInputHorizon" :style="customStyle">
        <div class="label" v-if="label">{{label}}</div>
        <el-input
                v-if="isNumberInput"
                :placeholder="placeholder"
                oninput="value=value.replace(/[^\d]/g,'')"
                :style="customStyle"
                v-bind="$attrs"
                v-on="$listeners"
                size="small"
                clearable
                :show-password="showPassword"
                :suffix-icon="suffix?'el-icon-search':''">
        </el-input>
        <el-input
                v-if="!isNumberInput"
                :placeholder="placeholder"
                :style="customStyle"
                v-bind="$attrs"
                v-on="$listeners"
                size="small"
                clearable
                :show-password="showPassword"
                :suffix-icon="suffix?'el-icon-search':''">
        </el-input>
        <div  :style="{color:'white',fontSize: '12px',marginLeft:'5px',marginRight:'2px',width:'10px'}">{{append}}</div>
    </div>
</template>

<script>
  export default {
    name: "VonBDUInputHorizon",
    data() {
      return {

      }
    },
    props: {
      append:{
        type:String,
        default:''
      },
      isNumberInput:{
        type: Boolean,
        default: false
      },
      suffix: {
        type: Boolean,
        default: false
      },
      placeholder: {
        type: String,
        default: ''
      },
      showPassword: {
        type: Boolean,
        default: false,
      },
      width: {
        type: String,
        default: ''
      },
      height: {
        type: String,
        default: '32px'
      },
      label: {
        type: String,
        default: ''
      }
    },
    computed: {
      customStyle() {
        let styleObj = {};
        styleObj.width = this.width;
        styleObj.height = this.height;
        styleObj.lineHeight = this.height;
        return styleObj;
      }
    }
  }
</script>

<style lang="scss" scoped>

    .VonBDUInputHorizon {
        margin: 10px;
        width: 100%;
        display: flex;
        .label {
            flex: 0 0 90px;
            margin-right: 4px;
            color: white;
            font-size: 12px;
            text-align: center;
        }
    }
    /deep/.VonBDUInputHorizon{
        .el-form-item__content{
            padding-left: 4px;
        }
    }
    /deep/ .el-input__inner{
        background: transparent!important;
        height: 32px!important;
        line-height: 32px!important;
        color: white;
    }
</style>
